package com.gitee.liuzhi.demo.juc.threadpoolexecutor.task;


import lombok.extern.slf4j.Slf4j;

import java.util.Random;
import java.util.concurrent.Callable;

/**
 * Callable任务类
 *
 * @Author liuzhi
 * @Date 2023/9/6 20:39
 * @Version 1.0
 * @Description
 */
@Slf4j
public class MyCallable implements Callable {

    private final Random random = new Random();

    @Override
    public Integer call() {
        int i = random.nextInt(100) + 1;
        log.info(Thread.currentThread().getName() + " : get random number : " + i);
        return i;
    }

}
